<div id="mainColumns">
	<h2>このクラスの決済情報一覧を見る</h2>
	<?php foreach ($details as $detail):?>
<?php
$time = strtotime($detail['CourseDetail']['opening_date']);
?>
	<div class="transactionCourse hover">
		<h3><?php echo $detail['Course']['title'];?> [<?php echo date('Y/m/d', $time);?>]</h3>
		<div class="halfBox">
			<p><span class="title">開催日時</span><br /><?php echo date('Y/m/d', $time);?></p>
			<p><span class="title">参加費用</span><br />¥&nbsp;<?php echo number_format($detail['CourseDetail']['price']);?></p>
			<p><span class="title">支払い方法</span><br />
			<?php foreach ($detail['PaymentMethod'] as $payment):?>
			<?php echo $payment['payment_method'];?>&nbsp;
			<?php endforeach;?>
			</p>
		</div><!--
					--><div class="halfBox">
		<p><span class="title">参加人数合計</span><br /><?php echo intval($detail['CourseCounting']['entered_counting']);?>/<?php echo $detail['CourseDetail']['attend_total'];?></p>
		<p><span class="title">回収済み参加費用</span><br />
			<?php echo number_format(intval($detail['CourseCounting']['entered_counting']) * $detail['CourseDetail']['price']);?>/<?php echo number_format($detail['CourseDetail']['attend_total'] * $detail['CourseDetail']['price']);?>
		</p>
		<p><span class="title">回収状況</span><br /><?php echo $detail['CourseDetail']['payout_flg'] ? $detail['CourseDetail']['payouted'] : '決済されていない';?></p>
	</div>
		<p class="right"><?php echo $this->Html->link('このクラスの決済情報を見る', array('action' => 'view', $detail['CourseDetail']['id']));?></p>
	</div>
	<?php endforeach;?>
	<div id="pageNationBox">
		<?php echo $this->element('admin_paginator');?>
	</div>
</div>
<div id="subColumns">
	<?php echo $this->Form->create('CourseTransaction', array('url' => array('controller' => 'CourseTransaction', 'action' => 'index'), 'type' => 'get'));?>
		<div class="section">
			<div class="rows select">
				<p><label for="searchResultNum">検索結果数</label></p>
				<select name="limit" id="searchResultNum">
					<option value="25" <?php if (isset($this->params['url']['limit']) && $this->params['url']['limit'] === '25'):?>selected="selected"<?php endif;?>>25</option>
					<option value="50" <?php if (isset($this->params['url']['limit']) && $this->params['url']['limit'] === '50'):?>selected="selected"<?php endif;?>>50</option>
					<option value="100" <?php if (isset($this->params['url']['limit']) && $this->params['url']['limit'] === '100'):?>selected="selected"<?php endif;?>>100</option>
				</select>
			</div>
			<div class="rows select">
				<p><label for="searchResultType">検索対象</label></p>
				<select name="type" id="searchResultType">
					<option selected="selected" value="course">クラス</option>
					<option value="users">ユーザ</option>
				</select>
			</div>
			<div class="rows select">
				<p><label for="searchTitle">クラスタイトル</label></p>
				<input type="text" name="title" id="searchTitle" value="<?php echo isset($this->params['url']['title']) ? $this->params['url']['title'] : '';?>" />
			</div>
		</div>
		<div class="section">
			<div class="rows" id="payment">
				<p>クラスステータス</p>
				<input type="radio" name="course" id="courseDelete" value="0" <?php if (isset($this->params['url']['course']) && $this->params['url']['course'] === '0'):?>checked="checked"<?php endif;?> />
				<label for="courseDelete">削除されていない</label><br />
				<input type="radio" name="course" id="courseNotDelete" value="1" <?php if (isset($this->params['url']['course']) && $this->params['url']['course'] === '1'):?>checked="checked"<?php endif;?> /> <label for="courseNotDelete">削除済み</label><br />
				<input type="radio" name="course" id="courseAll" value="" <?php if (!isset($this->params['url']['course']) || $this->params['url']['course'] === ''):?>checked="checked"<?php endif;?> /> <label for="courseAll">全てのクラス</label>
			</div>
			<div class="rows" id="payout">
				<p>決済状況</p>
				<input type="radio" name="payout" id="payoutYet" value="0" <?php if (isset($this->params['url']['payout']) && $this->params['url']['payout'] === '0'):?>checked="checked"<?php endif;?> /> <label for="payoutYet">決済されていない</label><br />
				<input type="radio" name="payout" id="payoutAlready" value="1" <?php if (isset($this->params['url']['payout']) && $this->params['url']['payout'] === '1'):?>checked="checked"<?php endif;?>  /> <label for="payoutAlready">決済済み</label><br />
				<input type="radio" name="payout" id="payoutAll" value="" <?php if (!isset($this->params['url']['payout']) || $this->params['url']['payout'] === ''):?>checked="checked"<?php endif;?> /> <label for="payoutAll">全てのクラス</label>
			</div>
		</div>
	<?php echo $this->Form->end('検索');?>
</div>